import { EntityName } from '../../consts/resources';
import { BulletType } from './bullet';

export type RoleConfig = {
    speed: number; // 移动速度
    hp: number; // 初始血量
    bulletType: BulletType; // 子弹类型
    crashDanger: number; // 碰撞给对方造成伤害
};

const enemyConfig: { [key: string]: RoleConfig } = {
    [EntityName.Enemy1]: { speed: -200, hp: 1, bulletType: BulletType.BulletEnemy1, crashDanger: 1 },
    [EntityName.Enemy2]: { speed: -150, hp: 2, bulletType: BulletType.BulletEnemy1, crashDanger: 2 },
    [EntityName.Enemy3]: { speed: -80, hp: 6, bulletType: BulletType.BulletEnemy2, crashDanger: 3 }
};

export const getEnemyConfig = (name: string): Readonly<RoleConfig> => {
    return enemyConfig[name];
};
